Skip to content

Nomad queue system - #13

Merged
gjb1002 merged 6 commits into
texttest:masterfrom
JesperMorelli:nomad-queue-system
Nov 25, 2026
Merged

gjb1002 merged 6 commits into
texttest:masterfrom
JesperMorelli:nomad-queue-system

Conversation

@JesperMorelli

Copy link
Copy Markdown

No description provided.

Jesper Morelli Hansen added 5 commits November 11, 2026 18:40
New extra version "nomad", in the style of condor: Batch2Tests, plus
NotInstalled, BadQueue and PollSlaveCrash under ErrorHandling. Recorded
against a local Nomad dev agent (2.1.1, Windows).

Nomad is driven via HTTP, but CaptureMock's HTTP mode can't be combined with
the classic server needed for the master/slave traffic. So the tests
intercept TextTest's nomadapi module (and secrets.token_hex, used in job IDs)
as Python traffic. Recorded API responses are cut down to the fields the
module reads.

Nomad slaves only get the environment the master sends, so the nomad personal
config forwards STANDARD_PERSONAL, plus CAPTUREMOCK_SERVER and
TEXTTEST_PICKLE_PROTOCOL which the slaves need while recording. PollSlaveCrash
deliberately leaves out STANDARD_PERSONAL so that the slave really crashes.
- Re-record Batch2Tests and PollSlaveCrash for the new job IDs, which now
  include a submission counter, and the explicit Datacenters.
- Make the Windows recordings comparable on Linux and macOS: turn the
  doubled backslashes in recorded job specifications into slashes.
- Ignore the attribute lookups Python's import machinery makes when
  CaptureMock intercepts the module, which may vary between versions.
- Remove personal data from the recordings: local paths, and the slave's
  stderr in PollSlaveCrash and the Windows-specific connection error in
  NotInstalled, both replaced with neutral text.
Set HOME and USERPROFILE to the test sandbox so the recorded home
directory is the same on every machine.
@gjb1002

gjb1002 commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

@JesperMorelli 2 tests are failing in CI. From a quick glance it looks like there is a need to filter the "User" field in the pythonmocks files. Can you check?

The mocks were recorded on Windows, where slave tasks get no User. On
Linux and macOS they do, which made Batch2Tests and PollSlaveCrash fail
there. Drop the User line, and the end of the line before it, which
differs as a result.
@gjb1002
gjb1002 merged commit b47e0e6 into texttest:master Nov 25, 2026
19 of 20 checks passed
@gjb1002

gjb1002 commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

@JesperMorelli merged these too now. Many thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants